#pragma once

#include <ros/ros.h>
#include <geometry_msgs/Pose.h>
#include <geometry_msgs/Pose2D.h>
#include <kybot_msg/SwitchMapSrv.h>
#include <kybot_msg/SearchMapSrv.h>
 
 namespace kybot_map {

//地图操作接口
 class MapOperation
 {
 public:
    MapOperation();
    void Init();
    
    //重定位
    virtual bool RelocatorPos(geometry_msgs::Pose2D pose) = 0;
    //开始定位
    virtual bool StartLocalization(const std::string& param) = 0;
    //停止定位
    virtual bool StopLocalization(const std::string& param) = 0;
    virtual bool SwitchMap(const std::string& map_name) = 0;
    virtual bool SearchMap(std::vector<std::string>& mapNameList_,const std::string& mapFolderPath_) = 0;

    static boost::shared_ptr<MapOperation> CreateMapOperation(const std::string& type);
    inline std::string GetLastFailReason() const {return fail_reason_;}
protected:
    std::string fail_reason_;
 };

}